package com.zdp.redis;

import redis.clients.jedis.Jedis;

/**
 * @author sesshomaru
 * @date 2020/4/27 20:48
 */
public class MyRedisTemplate {

    private Jedis jedis;

    private String host;

    private int port;

    public MyRedisTemplate(String host,int port){
        this.port = port;
        this.host = host;
        jedis = new Jedis(host,port);
    }

    public Jedis getConnection(){
        return jedis;
    }

    public String zdpRedisToString(){
        return "自定义配置,host: "+host+",port: "+port;
    }

}
